﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;

namespace Pixysoft.Framework.Reflection
{
    public interface IDynamicType
    {
        IDynamicConstructorInfo GetDefaultConstructor();
        IDynamicConstructorInfo GetConstructor(Type[] types);


        IDynamicFieldInfo GetField(string name);
        IDynamicFieldInfo GetField(string name, BindingFlags bindingAttr);


        IDynamicPropertyInfo GetProperty(string name);
        IDynamicPropertyInfo GetProperty(string name, BindingFlags bindingAttr);
        IDynamicPropertyInfo[] GetProperties();

        /// <summary>
        /// 获取公共方法、不支持范型、不支持in/out/ref、不支持范型的类
        /// </summary>
        /// <param name="name"></param>
        /// <param name="types"></param>
        /// <returns></returns>
        IDynamicMethodInfo GetMethod(string name);
        /// <summary>
        /// 获取公共方法、不支持范型、不支持in/out/ref、不支持范型的类
        /// </summary>
        /// <param name="name"></param>
        /// <param name="types"></param>
        /// <returns></returns>
        IDynamicMethodInfo GetMethod(string name, Type[] types);

        IDynamicMethodInfo GetMethod(IDummyMethodInfo info);

        IDynamicMethodInfo GetMethod(MethodInfo info);
    }
}
